# 作业1
words = ["apple", "banana", "cherry", "orange"]
new_word = list(map(lambda word: word.upper(), words))
print(new_word)
# 作业2
num_list = [30, 85, 1000, 620, 73, 95, 520]
new_num_list = list(filter(lambda num: num >= 100, num_list))
print(new_num_list)
# 作业3
student_list = ["小明-85", "小红-76", "小白-100", "小美-90"]


def func(x):
    for i in range(0, 2):
        if x.split("-")[i].isdecimal():
            return int(x.split("-")[i])


new_student_list = sorted(student_list, key=func)
print(new_student_list)

sorted_list = sorted(student_list, key=lambda x: int(x[x.index("-") + 1:]))
print(sorted_list)
